﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Surpass.Repository.Migrations
{
    public partial class homeinit : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Sys_Menu",
                columns: table => new
                {
                    MenuId = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
                    MenuName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
                    ParentMenuId = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    Level = table.Column<int>(type: "int", nullable: false),
                    Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
                    Type = table.Column<int>(type: "int", nullable: false),
                    Icon = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    OrderIndex = table.Column<int>(type: "int", nullable: false),
                    Deleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatedBy = table.Column<long>(type: "bigint", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedBy = table.Column<long>(type: "bigint", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_Menu", x => x.MenuId);
                });

            migrationBuilder.CreateTable(
                name: "Sys_Role",
                columns: table => new
                {
                    RoleId = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RoleName = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: false),
                    RoleDesc = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Deleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatedBy = table.Column<long>(type: "bigint", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedBy = table.Column<long>(type: "bigint", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_Role", x => x.RoleId);
                });

            migrationBuilder.CreateTable(
                name: "Sys_User",
                columns: table => new
                {
                    UserId = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    NickName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
                    PassWord = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
                    Email = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    Sex = table.Column<int>(type: "int", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Deleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatedBy = table.Column<long>(type: "bigint", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedBy = table.Column<long>(type: "bigint", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_User", x => x.UserId);
                });

            migrationBuilder.CreateTable(
                name: "Sys_Role_Menu_Relation",
                columns: table => new
                {
                    RoleId = table.Column<long>(type: "bigint", nullable: false),
                    MenuId = table.Column<string>(type: "nvarchar(40)", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Deleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatedBy = table.Column<long>(type: "bigint", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedBy = table.Column<long>(type: "bigint", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_Role_Menu_Relation", x => new { x.RoleId, x.MenuId });
                    table.ForeignKey(
                        name: "FK_Sys_Role_Menu_Relation_Sys_Menu_MenuId",
                        column: x => x.MenuId,
                        principalTable: "Sys_Menu",
                        principalColumn: "MenuId",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Sys_Role_Menu_Relation_Sys_Role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "Sys_Role",
                        principalColumn: "RoleId",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Sys_User_Role_Relation",
                columns: table => new
                {
                    UserId = table.Column<long>(type: "bigint", nullable: false),
                    RoleId = table.Column<long>(type: "bigint", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Deleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatedBy = table.Column<long>(type: "bigint", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedBy = table.Column<long>(type: "bigint", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_User_Role_Relation", x => new { x.RoleId, x.UserId });
                    table.ForeignKey(
                        name: "FK_Sys_User_Role_Relation_Sys_Role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "Sys_Role",
                        principalColumn: "RoleId",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Sys_User_Role_Relation_Sys_User_UserId",
                        column: x => x.UserId,
                        principalTable: "Sys_User",
                        principalColumn: "UserId",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.InsertData(
                table: "Sys_Menu",
                columns: new[] { "MenuId", "CreatedBy", "CreatedTime", "Deleted", "Icon", "Level", "MenuName", "OrderIndex", "ParentMenuId", "Type", "UpdatedBy", "UpdatedTime", "Url" },
                values: new object[,]
                {
                    { "M1", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6589), false, "el-icon-setting", 1, "系统管理", 1, "", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(3467), "" },
                    { "M502", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6804), false, "lion-icon-rizhi", 2, "任务日志", 2, "M5", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6802), "quartz/tasklog" },
                    { "M501", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6800), false, "lion-icon-renwu", 2, "任务管理", 1, "M5", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6798), "quartz/task" },
                    { "M40202", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6796), false, "el-icon-potato-strips", 3, "三级1-2-2", 2, "M402", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6794), "menu/threeMenu/nextMenu/three1-2-2" },
                    { "M40201", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6793), false, "el-icon-milk-tea", 3, "三级1-2-1", 1, "M402", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6790), "menu/threeMenu/nextMenu/three1-2-1" },
                    { "M402", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6788), false, "el-icon-potato-strips", 2, "三级1-2", 2, "M4", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6786), "" },
                    { "M401", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6785), false, "el-icon-milk-tea", 2, "三级1-1", 1, "M4", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6783), "menu/threeMenu/three1-1" },
                    { "M303", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6781), false, "el-icon-lollipop", 2, "二级1-3", 3, "M3", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6779), "menu/secondMenu/second1-3" },
                    { "M302", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6775), false, "el-icon-potato-strips", 2, "二级1-2", 2, "M3", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6773), "menu/secondMenu/second1-2" },
                    { "M301", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6772), false, "el-icon-milk-tea", 2, "二级1-1", 1, "M3", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6769), "menu/secondMenu/second1-1" },
                    { "M102", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6768), false, "el-icon-menu", 2, "菜单管理", 2, "M1", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6766), "home/systemManage/menuManage" },
                    { "B101_U_EDIT", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6764), false, "", 1, "用户-编辑", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6762), "u_edit" },
                    { "B101_U_DELETE", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6760), false, "", 1, "用户-删除", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6758), "u_delete" },
                    { "B101_U_ADD", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6756), false, "", 1, "用户-增加", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6754), "u_add" },
                    { "B101_R_EDIT", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6753), false, "", 1, "角色-编辑", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6751), "r_edit" },
                    { "B101_R_DELETE", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6749), false, "", 1, "角色-删除", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6747), "r_delete" },
                    { "B101_R_PERMS_CONFIG", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6678), false, "", 1, "角色-配置权限", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6675), "r_perms_config" },
                    { "B101_R_RELATION", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6674), false, "", 1, "角色-关联角色", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6672), "r_relation" },
                    { "B101_R_ADD", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6670), false, "", 1, "角色-添加", 0, "M101", 2, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6668), "r_add" },
                    { "M101", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6667), false, "el-icon-user", 2, "用户管理", 1, "M1", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6664), "home/systemManage/userManage" },
                    { "M5", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6654), false, "lion-icon-renwutiaodu", 1, "任务调度", 1, "", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6652), "" },
                    { "M4", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6650), false, "el-icon-ice-cream-round", 1, "三级多级菜单", 4, "", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6648), "" },
                    { "M3", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6646), false, "el-icon-ice-cream-round", 1, "二级菜单", 3, "", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6643), "" },
                    { "M2", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6641), false, "el-icon-wind-power", 1, "一级菜单", 2, "", 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 568, DateTimeKind.Local).AddTicks(6636), "menu/singleMenu/index" }
                });

            migrationBuilder.InsertData(
                table: "Sys_Role",
                columns: new[] { "RoleId", "CreatedBy", "CreatedTime", "Deleted", "RoleDesc", "RoleName", "UpdatedBy", "UpdatedTime" },
                values: new object[] { 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 565, DateTimeKind.Local).AddTicks(8016), false, "系统创建", "系统管理员", 0L, new DateTime(2021, 7, 31, 17, 16, 21, 565, DateTimeKind.Local).AddTicks(6785) });

            migrationBuilder.InsertData(
                table: "Sys_User",
                columns: new[] { "UserId", "CreatedBy", "CreatedTime", "Deleted", "Email", "NickName", "PassWord", "Sex", "State", "UpdatedBy", "UpdatedTime" },
                values: new object[] { 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 564, DateTimeKind.Local).AddTicks(1822), false, "levywang123@gmail.com", "admin", "admin", 1, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 564, DateTimeKind.Local).AddTicks(2229) });

            migrationBuilder.InsertData(
                table: "Sys_Role_Menu_Relation",
                columns: new[] { "MenuId", "RoleId", "CreatedBy", "CreatedTime", "Deleted", "State", "UpdatedBy", "UpdatedTime" },
                values: new object[,]
                {
                    { "M1", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3044), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(1620) },
                    { "M501", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3573), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3572) },
                    { "M40202", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3571), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3569) },
                    { "M40201", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3568), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3566) },
                    { "M402", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3565), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3564) },
                    { "M401", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3562), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3561) },
                    { "M303", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3559), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3558) },
                    { "M302", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3554), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3553) },
                    { "M301", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3551), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3550) },
                    { "M102", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3548), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3547) },
                    { "B101_U_EDIT", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3546), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3544) },
                    { "M502", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3576), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3575) },
                    { "B101_U_DELETE", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3542), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3540) },
                    { "B101_R_EDIT", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3477), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3475) },
                    { "B101_R_DELETE", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3474), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3472) },
                    { "B101_R_PERMS_CONFIG", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3470), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3468) },
                    { "B101_R_RELATION", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3467), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3465) },
                    { "B101_R_ADD", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3464), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3462) },
                    { "M101", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3460), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3459) },
                    { "M5", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3454), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3453) },
                    { "M4", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3451), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3450) },
                    { "M3", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3448), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3446) },
                    { "M2", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3444), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3437) },
                    { "B101_U_ADD", 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3538), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 569, DateTimeKind.Local).AddTicks(3536) }
                });

            migrationBuilder.InsertData(
                table: "Sys_User_Role_Relation",
                columns: new[] { "RoleId", "UserId", "CreatedBy", "CreatedTime", "Deleted", "State", "UpdatedBy", "UpdatedTime" },
                values: new object[] { 1L, 1L, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 566, DateTimeKind.Local).AddTicks(1063), false, 1, 0L, new DateTime(2021, 7, 31, 17, 16, 21, 566, DateTimeKind.Local).AddTicks(288) });

            migrationBuilder.CreateIndex(
                name: "IX_Sys_Role_RoleId",
                table: "Sys_Role",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_Sys_Role_Menu_Relation_MenuId",
                table: "Sys_Role_Menu_Relation",
                column: "MenuId");

            migrationBuilder.CreateIndex(
                name: "IX_Sys_User_Email",
                table: "Sys_User",
                column: "Email",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_Sys_User_UserId",
                table: "Sys_User",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_Sys_User_Role_Relation_UserId",
                table: "Sys_User_Role_Relation",
                column: "UserId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Sys_Role_Menu_Relation");

            migrationBuilder.DropTable(
                name: "Sys_User_Role_Relation");

            migrationBuilder.DropTable(
                name: "Sys_Menu");

            migrationBuilder.DropTable(
                name: "Sys_Role");

            migrationBuilder.DropTable(
                name: "Sys_User");
        }
    }
}
